<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>


<script>

function embolden(n){
	if(typeof n=="string")n=document.getElementById(n);
	
	var b=document.createElement("b");
	var parent=n.parentNode;
	var test=document.createElement("p");
	test.innerHTML="qwdqwdqwdqwdqwd";
	
	
	parent.replaceChild(b,n);
	
	
	var clone=n.cloneNode(true);
	
	parent.appendChild(clone);
	
	
	
}



</script>
<!-- 2 -->

<p id="p1">This <i>is</i>paragraph #1.</p>
<p id="p2">This <i>is</i>paragraph #2.</p>

<button onclick="embolden('p2');"> Embolden</button>





</body>
</html>
